package com.bank.entity;

import javax.persistence.*;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@Table(name = "cardinfo")
public class CardInfo {
    @Id
    @Column(name = "cardID")
    private String cardID;

    @Column(name = "curID")
    private String curID;

    @Column(name = "savingID")
    private Long savingID;

    @Column(name = "openDate")
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    private Date openDate;

    @Column(name = "openMoney")
    private Double openMoney;

    @Column(name = "balance")
    private Double balance;

    @Column(name = "pass")
    private String pass;

    @Column(name = "isReportLoss")
    private String isReportLoss;

    @Column(name = "customerID")
    private Long customerID;

    @Column(name = "customerName")
    private String customerName;

    // getter/setter
    public String getCardID() { return cardID; }
    public void setCardID(String cardID) { this.cardID = cardID; }
    public String getCurID() { return curID; }
    public void setCurID(String curID) { this.curID = curID; }
    public Long getSavingID() { return savingID; }
    public void setSavingID(Long savingID) { this.savingID = savingID; }
    public Date getOpenDate() { return openDate; }
    public void setOpenDate(Date openDate) { this.openDate = openDate; }
    public Double getOpenMoney() { return openMoney; }
    public void setOpenMoney(Double openMoney) { this.openMoney = openMoney; }
    public Double getBalance() { return balance; }
    public void setBalance(Double balance) { this.balance = balance; }
    public String getPass() { return pass; }
    public void setPass(String pass) { this.pass = pass; }
    public String getIsReportLoss() { return isReportLoss; }
    public void setIsReportLoss(String isReportLoss) { this.isReportLoss = isReportLoss; }
    public Long getCustomerID() { return customerID; }
    public void setCustomerID(Long customerID) { this.customerID = customerID; }
    public String getCustomerName() { return customerName; }
    public void setCustomerName(String customerName) { this.customerName = customerName; }
} 